import numpy as np
import cv2 as cv
filePath ='../../data/numberOne.png'
img = cv.imread(filePath)
imgGray=cv.cvtColor(img,cv.COLOR_BGR2GRAY)
thresh,maxValue =127,255
threshType =cv.THRESH_BINARY
ret,thresh=cv.threshold(imgGray, thresh, maxValue, threshType)

retrievalMode=cv.RETR_TREE
approxMethod=cv.CHAIN_APPROX_NONE
contours, hierachy = cv.findContours(thresh, retrievalMode, approxMethod)

imgBackGround =np.zeros(img.shape,np.uint8)
cv.drawContours(imgBackGround,contours,1,(0,0,255),2)

cv.imshow("dst",imgBackGround)
cv.waitKey(0)
cv.destroyAllWindows()